﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ID_card
{
    class card02 :Save_card
    {
        public double Money;

        public card02()
        {
        }

        public card02(double money)
        {
            base.Money = money;
            this.Money = money;
        }

        public override void backMoney(CreditCard c)
        {
            
            Console.WriteLine("\n卡1接收到信息，开始决策是否满足还款条件\n");
            if (Money < c.Fee)
            {
                Console.WriteLine("卡1余额不足");
                return;
            }
            this.Money = this.Money - c.Fee;
            c.Fee = 0;
            Console.WriteLine("\n还款成功！\n");
            Console.WriteLine("此时卡2余额：{0}  信用卡额度（总额度{1}）：{2}", this.Money, c.Exetral, c.Exetral - c.Fee);
        }
    }
}
